package com.dfs.parent.service.fallback;

import com.dfs.parent.common.core.domain.Result;
import com.dfs.parent.service.dto.ProductDTO;
import com.dfs.parent.service.feign.ProductFeignClient;
import com.dfs.parent.service.vo.ProductVO;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component
public class ProductFeignClientFallback implements ProductFeignClient {
    @Override
    public Result<ProductVO> reduceCount(ProductDTO productDTO) {
        System.out.println("ProductFeignClientFallback 执行到这里了");
        //可以抛异常全局捕获
        return Result.ok(new ProductVO());//
       // return Result.fail(new ProductVO());//
    }

    @Override
    public Result<String> config() {
        return Result.ok("11111111");
    }
}
